package com.sunpy.niohttp.user;

import com.sunpy.niohttp.annotation.ReqBody;
import com.sunpy.niohttp.annotation.ReqPath;
import com.sunpy.niohttp.annotation.RespBodyJson;
import com.sunpy.niohttp.constant.HTTP_Method;
import com.sunpy.niohttp.model.Result;

public class UserRequestController {

    @ReqPath(value = "/postUserInfo", method = HTTP_Method.POST)
    @RespBodyJson
    public String postUserInfo(int a, float b, double c, @ReqBody String str, Object d) {
        System.out.println("POST方式获取用户基本信息");
        System.out.println("reqBody : " + str);
        return "111";
    }

    @ReqPath(value = "/getUserInfo")
    @RespBodyJson
    public Result getUserInfo() {
        Result result = new Result();
        result.setSuccess(true);
        result.setMsg("GET方式获取用户基本信息");
        result.setCode(200);
        System.out.println("GET方式获取用户基本信息");
        return result;
    }
}
